package com.example.bookmall.service;

import com.example.bookmall.entity.Category;
import com.example.bookmall.entity.Result;

import java.util.List;

public interface CategoryService {
    //添加分类
    Result addCategory(Category category);

    //获取所有分类
    List<Category> getAllCategories();

    //修改分类
    Result updateCategory(Category category);

    //删除分类
    Result deleteCategory(Integer categoryId);

    //根据id获取分类
    Category getCategoryById(Integer categoryId);

    //根据名称获取分类
    List<Category> getCategoryByName(String categoryName);

    //根据名称获取分类
    Category seCategoryByName(String categoryName);
}
